package com.vshop.service.impl;

import com.vshop.entity.comentity.UserOrderPayment;
import com.vshop.mapper.UserOrderPaymentMapper;
import com.vshop.service.UserOrderPaymentService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional(rollbackFor = Exception.class)
public class UserOrderPaymentServiceImpl implements UserOrderPaymentService {
    @Resource
    UserOrderPaymentMapper userOrderPaymentMapper;

    @Override
    public void insertPaymentUserHaveCard(UserOrderPayment payment) {
        userOrderPaymentMapper.insertPaymentUserHaveCard(payment);
    }

    @Override
    public void insertPaymentUserNoCard(UserOrderPayment payment) {
        userOrderPaymentMapper.insertPaymentUserNoCard(payment);
    }

    @Override
    public int findCountById(String partnerCode, String requestOrderId, String payId, String amount, String payCurrency) {
        return userOrderPaymentMapper.findCountById(partnerCode, requestOrderId, payId, amount, payCurrency);
    }

    @Override
    public void dataTransfer() {
        userOrderPaymentMapper.dataTransfer();
    }

    @Override
    public void originalDataDelete() {
        userOrderPaymentMapper.originalDataDelete();

    }
}
